<template>
  <div>
    <div>
      <el-radio-group v-model="radio">
        <el-radio label="1">整改单</el-radio>
        <el-radio label="2">整改回执单</el-radio>
        <!-- <el-radio :label="9">备选项</el-radio> -->
      </el-radio-group>
    </div>
    <div style="height:600px;margin: 30px" v-if="radio==1">
      <el-form :model="queryParams" ref="queryForm">
        <el-col :span="12">
          <el-form-item label="检查单名称" prop="roleName">
            <el-input
              v-model="queryParams.roleName"
              placeholder="请输入"
              clearable
              style="width: 240px"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="检查单据号" prop="roleKey">
            <el-input
              v-model="queryParams.roleKey"
              placeholder="请输入"
              clearable
              style="width: 240px"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="检查单位" prop="roleKey">
            <el-select
              v-model="queryParams.status"
              placeholder="角色状态"
              clearable
              style="width: 240px"
            >
              <el-option
                v-for="dict in dict.type.sys_normal_disable"
                :key="dict.value"
                :label="dict.label"
                :value="dict.value"
              />
            </el-select>
          </el-form-item>
          <el-form-item label="单位类型" prop="roleKey">
            <el-select
              v-model="queryParams.status"
              placeholder="请选择"
              clearable
              style="width: 240px"
            >
              <el-option
                v-for="dict in dict.type.sys_normal_disable"
                :key="dict.value"
                :label="dict.label"
                :value="dict.value"
              />
            </el-select>
          </el-form-item>
          <!-- <el-form-item label="整改人" prop="roleKey">
          <el-input
            v-model="queryParams.roleKey"
            placeholder="请输入"
            clearable
            style="width: 240px"
            @keyup.enter.native="handleQuery"
          />
          </el-form-item>-->
        </el-col>

        <el-col :span="12">
          <el-form-item label="受检部门" prop="roleKey">
            <el-select
              v-model="queryParams.status"
              placeholder="请选择"
              clearable
              style="width: 240px"
            >
              <el-option
                v-for="dict in dict.type.sys_normal_disable"
                :key="dict.value"
                :label="dict.label"
                :value="dict.value"
              />
            </el-select>
          </el-form-item>
          <el-form-item label="责任部门" prop="roleKey">
            <el-select
              v-model="queryParams.status"
              placeholder="请选择"
              clearable
              style="width: 240px"
            >
              <el-option
                v-for="dict in dict.type.sys_normal_disable"
                :key="dict.value"
                :label="dict.label"
                :value="dict.value"
              />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="检查人" prop="roleKey">
            <el-input
              v-model="queryParams.roleKey"
              placeholder="请输入"
              clearable
              style="width: 240px"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="要求完成时间" prop="roleKey">
            <el-date-picker
              v-model="queryParams.dateRange"
              style="width: 240px"
              value-format="yyyy-MM-dd HH:mm:ss"
              type="daterange"
              range-separator="-"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
              :default-time="['00:00:00', '23:59:59']"
            ></el-date-picker>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="文件编号" prop="roleKey">
            <el-input
              v-model="queryParams.roleKey"
              placeholder="请输入"
              clearable
              style="width: 240px"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="登记部门" prop="roleKey">
            <el-select
              v-model="queryParams.status"
              placeholder="请选择"
              clearable
              style="width: 240px"
            >
              <el-option
                v-for="dict in dict.type.sys_normal_disable"
                :key="dict.value"
                :label="dict.label"
                :value="dict.value"
              />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="整改人" prop="roleKey">
            <el-input
              v-model="queryParams.roleKey"
              placeholder="请输入"
              clearable
              style="width: 240px"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="检查时间" prop="roleKey">
            <el-date-picker
              v-model="queryParams.dateRange"
              style="width: 240px"
              value-format="yyyy-MM-dd HH:mm:ss"
              type="daterange"
              range-separator="-"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
              :default-time="['00:00:00', '23:59:59']"
            ></el-date-picker>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="整改责任人" prop="roleKey">
            <el-input
              v-model="queryParams.roleKey"
              placeholder="请输入"
              clearable
              style="width: 240px"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
        </el-col>
      </el-form>
    </div>
    <div style="height:600px;margin: 30px" v-if="radio==2">
      <el-form :model="queryParams" ref="queryForm">
        <el-col :span="12">
          <el-form-item label="被检查单位负责人" prop="roleName">
            <el-input
              v-model="queryParams.roleName"
              placeholder="请输入"
              clearable
              style="width: 240px"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="备注" prop="roleKey">
            <el-input
              v-model="queryParams.roleKey"
              placeholder="请输入"
              clearable
              style="width: 240px"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="整改措施" prop="roleKey">
            <el-input
              v-model="queryParams.roleKey"
              placeholder="请输入"
              clearable
              style="width: 240px"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="验收意见" prop="roleKey">
            <el-input
              v-model="queryParams.roleKey"
              placeholder="请输入"
              clearable
              style="width: 240px"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="复查人员" prop="roleKey">
            <el-input
              v-model="queryParams.roleKey"
              placeholder="请输入"
              clearable
              style="width: 240px"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="时间" prop="roleKey">
            <el-date-picker
              v-model="queryParams.dateRange"
              style="width: 240px"
              value-format="yyyy-MM-dd HH:mm:ss"
              type="daterange"
              range-separator="-"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
              :default-time="['00:00:00', '23:59:59']"
            ></el-date-picker>
          </el-form-item>
        </el-col>
      </el-form>
    </div>

    <div class="bt" style="text-align: center !important;">
      <el-button
        type="primary"
        @click="submitForm('queryForm')"
        v-if="isCreate!=2"
      >{{radio==1?'打印整改单':'打印整改回执单'}}</el-button>
      <el-button style="width:100px" @click="close">取消</el-button>
    </div>
  </div>
</template>
<script>
export default {
  dicts: ["sys_normal_disable"],
  data() {
    return {
      radio: "1",
      queryParams: {},
      checkList: []
    };
  },
  mounted() {
    this.$refs["queryForm"].resetFields();
  },
  methods: {
    submitForm() {
      console.log(queryParams, "queryParams");
    },
    close() {
      this.$emit("close");
    }
  }
};
</script>